package com.shangxia.monomer.business.xml;

import lombok.extern.slf4j.Slf4j;
import org.springframework.expression.spel.ast.PropertyOrFieldReference;

import java.util.concurrent.*;

/**
 * @ProjectName: monomer
 * @ClassName: SendDataJob
 * @Time: 2021/10/2
 * @Author: zhouy
 * @Description:
 * @Experience:
 */

@Slf4j
public class SendDataJob {

    private static BlockingQueue<SendDataThread> blockingDeque = new ArrayBlockingQueue(10);

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            blockingDeque.offer(new SendDataThread());
        }

        for (int i = 1; i <= 10; i++) {
            new Thread(blockingDeque.poll()).start();
        }

    }


}
